package com.gsit.omega.ea.web;

import com.gsit.omega.ea.domain.Activity;
import com.gsit.omega.ea.domain.Task;
import com.gsit.omega.ea.utils.ActivityStatus;
import java.util.Collection;
import org.springframework.roo.addon.web.mvc.controller.RooWebScaffold;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@RooWebScaffold(path = "tasks", formBackingObject = Task.class)
@RequestMapping("/tasks")
@Controller
public class TaskController {

    @ModelAttribute("activitys")
    public Collection<com.gsit.omega.ea.domain.Activity> populateActivitys() {
        return activityService.findAllActivitysByActivityStatus(ActivityStatus.ASSIGN);
    }
}
